feat: youtube chat read path via grpc streamlist#81
Conversation
|
This PR has 3561 lines changed. Consider splitting it into smaller PRs for easier review. |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Adds the YouTube live chat “read” pipeline end-to-end (Go sidecar gRPC stream → tagged ringbuf payloads → Rust host dispatch → unified message parsing), completing the third platform’s inbound chat path.
Changes:
- Introduces a Go sidecar gRPC
StreamListclient (proto + generated code) that protojson-serializesLiveChatMessageitems and prepends the0x03platform tag before writing to the ring buffer. - Updates Twitch EventSub to prepend the
0x01platform tag and updates Rustparse_batch()to dispatch parsing by tag. - Adds a Rust
parse_youtube_message()parser + unit tests; updates platform API docs.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/platform-apis.md | Documents YouTube gRPC streamList read path and tagged payload framing. |
| apps/desktop/src-tauri/src/message.rs | Adds parse_youtube_message() + tests for TEXT_MESSAGE_EVENT handling. |
| apps/desktop/src-tauri/src/host.rs | Dispatches parse_batch() by 1-byte platform tag; adds YouTube connect command serialization. |
| apps/desktop/src-sidecar/proto/stream_list.proto | Adds YouTube streamList proto definition. |
| apps/desktop/src-sidecar/internal/youtube/ytpb/* | Commits generated Go protobuf + gRPC stubs for streamList. |
| apps/desktop/src-sidecar/internal/youtube/client.go | Implements the YouTube gRPC streaming client and tagging. |
| apps/desktop/src-sidecar/internal/youtube/client_test.go | Adds tests around receiving/tagging messages from a fake gRPC server. |
| apps/desktop/src-sidecar/internal/twitch/eventsub.go | Prepends Twitch tag byte to outbound ringbuf payloads. |
| apps/desktop/src-sidecar/internal/twitch/eventsub_test.go | Adjusts test to handle tagged Twitch payloads. |
| apps/desktop/src-sidecar/internal/sidecar/sidecar.go | Wires new youtube_connect/youtube_disconnect commands to start/stop the client. |
| apps/desktop/src-sidecar/internal/control/control.go | Defines tag byte constants and extends command fields for YouTube. |
| apps/desktop/src-sidecar/go.mod / go.sum | Adds gRPC/protobuf dependencies and updates sums. |
- youtube: validate creds upfront, return ErrMissingCredentials - youtube: fix errcheck on conn.Close and lis.Close - youtube: rewrite tests with real gRPC fake server - youtube: clarify DialOpts override semantics - message: parse_youtube_message returns Ok(None) on empty fields - message: surface timestamp parse errors instead of silent now() - message: add tests for empty fields and bad timestamps
|
This PR has 3678 lines changed. Consider splitting it into smaller PRs for easier review. |
|
This PR has 3659 lines changed. Consider splitting it into smaller PRs for easier review. |
|
This PR has 3660 lines changed. Consider splitting it into smaller PRs for easier review. |
|
This PR has 3946 lines changed. Consider splitting it into smaller PRs for easier review. |
YouTube live chat read path, third and final platform.
StreamListclient in Go sidecar connecting toyoutube.googleapis.com:443x-goog-api-key) and OAuth Bearer auth supportpageTokentracking for resume on reconnect0x01Twitch,0x03YouTube (ring buffer payload prefix)parse_batch()dispatches by tag to platform-specific parsersparse_youtube_message()handlesTEXT_MESSAGE_EVENT, maps owner/mod/sponsor flagsyoutube_connect/youtube_disconnectsidecar commands